package com.tanhua.service;

import com.tanhua.domain.db.User;
import com.tanhua.dubbo.api.UserLocationApi;
import com.tanhua.util.UserHolder;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;

@Service
public class BaiduService {
    @Reference
    private UserLocationApi userLocationApi;
    public ResponseEntity location(Double latitude, Double longitude, String addrStr) {
        User user = UserHolder.getUser();
        userLocationApi.save(latitude,longitude,addrStr,user.getId());
        return ResponseEntity.ok(null);
    }
}
